package com.lpf.json.fastjson.JSONField;

import java.util.Date;

import com.alibaba.fastjson.annotation.JSONField;

public class User {
	@JSONField(name = "ID", ordinal = 3, serializeUsing = UserIDValueSerializer.class)
	private Long id;
	@JSONField(serialize = false)
	private String name;
	@JSONField(serialize = true, ordinal = 2)
	private String sex;

	@JSONField(deserialize = false)
	private String address;
	@JSONField(deserialize = true)
	private String phone;

	// 配置date序列化和反序列使用yyyyMMdd日期格式
	@JSONField(format = "yyyyMMdd", ordinal = 1)
	private Date date;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

}